<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('buyer/index')}">买家列表</a></li>
			<li><a href="{:url('buyer/add')}">添加买家</a></li>
			<li class="active"><a href="">编辑买家</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('buyer/editPost')}">
			<div class="form-group">
				<label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>客户名称</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-name" required name="name" value="{$result.name}">
				</div>
			</div>
			<div class="form-group">
				<label for="input-cid" class="col-sm-2 control-label"><span class="form-required">*</span>行业类别</label>
				<div class="col-md-6 col-sm-10">
					<select name="cid" class="form-control" id="input-cid">
						<volist name="cate" id="vo">
							<option value="{$vo.id}" <eq name="$vo.id" value="$result.cid">selected</eq> >{$vo.name}</option>
						</volist>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label for="input-phone" class="col-sm-2 control-label"><span class="form-required">*</span>联系电话</label>
				<div class="col-md-6 col-sm-10">
					<input type="tel" class="form-control" id="input-phone" required name="phone" value="{$result.phone}">
				</div>
			</div>
			<div class="form-group">
				<label for="input-manager" class="col-sm-2 control-label"><span class="form-required">*</span>负责人</label>
				<div class="col-md-6 col-sm-10">
					<input class="form-control" type="text" style="width:400px;" required value="{$result.mname}"
						   placeholder="请选择负责人" onclick="doSelectLayer(this);"
						   data-url="{:url('department/user/select')}" data-id="input-manager" name="layer_temp[1]"
						   readonly/>
					<input class="form-control" type="hidden" value="{$result.manager}" name="manager"
						   id="input-manager"/>
				</div>
			</div>
			<div class="form-group">
				<label for="input-source" class="col-sm-2 control-label"><span class="form-required">*</span>客户来源</label>
				<div class="col-md-6 col-sm-10">
					<input class="form-control" type="text" style="width:400px;" required value="{$result.nname}"
						   placeholder="请选择客户来源" onclick="doSelectLayer(this);"
						   data-url="{:url('customer_nature/select',['type'=>2])}" data-id="input-source" name="layer_temp[2]"
						   readonly/>
					<input class="form-control" type="hidden" value="{$result.source}" name="source"
						   id="input-source"/>
				</div>
			</div>
			<div class="form-group">
				<label for="input-customer_level" class="col-sm-2 control-label"><span class="form-required">*</span>客户级别</label>
				<div class="col-md-6 col-sm-10">
					<input class="form-control" type="text" style="width:400px;" required value="{$result.level_name}"
						   placeholder="请选择客户级别" onclick="doSelectLayer(this);"
						   data-url="{:url('customer_nature/select',['type'=>3])}" data-id="input-customer_level" name="layer_temp[3]"
						   readonly/>
					<input class="form-control" type="hidden" value="{$result.customer_level}" name="customer_level"
						   id="input-customer_level"/>
				</div>
			</div>
			<div class="form-group">
				<label for="input-nature" class="col-sm-2 control-label"><span class="form-required">*</span>客户类型</label>
				<div class="col-md-6 col-sm-10">
					<input class="form-control" type="text" style="width:400px;" required value="{$result.nature_name}"
						   placeholder="请选择客户类型" onclick="doSelectLayer(this);"
						   data-url="{:url('customer_nature/select',['type'=>7])}" data-id="input-nature" name="layer_temp[4]"
						   readonly/>
					<input class="form-control" type="hidden" value="{$result.nature}" name="nature"
						   id="input-nature"/>
				</div>
			</div>
			<div class="form-group">
				<label for="select-area" class="col-sm-2 control-label"><span class="form-required">*</span>需求区域</label>
				<div class="col-md-6 col-sm-10">
					<select class="form-control" id="select-area" name="area" required>
						<option>全国</option>
						<volist name="areaslist" id="vo">
							<option value="{$vo.areaid}">{$vo.name}</option>
						</volist>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label for="input-createtime" class="col-sm-2 control-label">录入时间</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control js-bootstrap-datetime" id="input-createtime" data-max-date="{:date('Y-m-d H:i')}" value="{$result.createtime|date='Y-m-d H:i',###}" required name="createtime">
				</div>
			</div>
			<div class="form-group">
				<label for="input-price" class="col-sm-2 control-label"><span class="form-required">*</span>价格</label>
				<div class="col-md-6 col-sm-10" style="width:400px;padding: 0 15px;">
					<div class="input-group">
						<span class="input-group-addon">¥</span>
						<input type="number" class="form-control" required id="input-price" name="price" value="{$result.price}">
						<span class="input-group-addon">万元</span>
					</div>
					<p class="help-block">（两位小数）</p>
				</div>
			</div>
			<div class="form-group">
				<label for="textarea-remark" class="col-sm-2 control-label">备注</label>
				<div class="col-md-6 col-sm-10">
					<textarea name="remark" class="form-control" id="textarea-remark" rows="3">{$result.remark}</textarea>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<input type="hidden" name="id" value="{$result.id}"/>
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
					<a class="btn btn-default" href="javascript:history.back(-1);">返回</a>
				</div>
			</div>
		</form>
	</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>